home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_12
/
kauffman
/
debug.h
< prev
Wrap
C/C++ Source or Header
|
1993-10-20
|
711b
|
39 lines
Listing 1 (debug.h)
===================
class MyDebugStreambuf : public strstreambuf
{
public:
MyDebugStreambuf( BOOL UseMessageBox,
char* pTitle );
~MyDebugStreambuf()
{
delete [];
}
virtual int overflow( int ch );
virtual int sync();
protected:
void Flush();
BOOL m_UseMessageBox;
char* m_pTitle;
unsigned m_BufferSize;
char* m_pBuffer;
};
class MyDebugStream : public ostream
{
public:
MyDebugStream( BOOL UseMessageBox = FALSE,
char* pTitle = NULL );
protected:
MyDebugStreambuf m_buf;
};
#define FLUSH_TO_BOX 0x01
#define FLUSH_TO_DEBUG 0x02
ostream& BoxFlush( ostream& os );
ostream& DebugFlush( ostream& os );